<template>
  <div class="denlv_cn">
    <div class="denlpic"><img src="@/assets/images/denl_pic.png"/> </div>
    <div class="ansuqu" @click="toFsAuth">进入</div>
  </div>
</template>

<script>
export default {
  name:'Login',
  data(){
    return {
      redirect: undefined
    }
  },
  watch: {
    $route: {
      handler: function(route) {
        this.redirect = route.query && route.query.redirect;
      },
      immediate: true
    }
  },
  methods:{
    toFsAuth(){
      let redirect_uri = `${window.location.origin}${this.redirect}`
      window.location.href = `${process.env.VUE_APP_BASE_API}/fs/auth?REDIRECT_URL=${encodeURIComponent(redirect_uri)}`
    }
  }
};
</script>

<style>
/* @import 引入仍为全局样式 */
  @import "../assets/css/style.css";
</style>